import { Controller, UseFilters, UseInterceptors, UsePipes, ValidationPipe, UseGuards } from '@nestjs/common';
import { ApiTags, ApiBearerAuth } from '@nestjs/swagger';
import { Crud, CrudController } from '@nestjsx/crud';
import { Migrate } from 'libs/db/entity/migrate.entity';
import { HttpExceptionFilter } from '../_filter/http-exception.filter';
import { LoggingInterceptor } from '../_interceptor/logging.interceptor';
import { MigrateCrudOps } from './migrate-crud-ops';
import { MigrateService } from './migrate.service';
import { AuthGuard } from '@nestjs/passport';


@Crud(MigrateCrudOps)
@UseFilters(HttpExceptionFilter)
@UsePipes(ValidationPipe)
@UseInterceptors(LoggingInterceptor)
@UseGuards(AuthGuard('jwt-admin'))
@ApiBearerAuth()
@ApiTags('信息管理 - 户口迁移')   //标签
@Controller('migrate')
export class MigrateController implements CrudController<Migrate> {
  constructor(public service: MigrateService) {
  }
}
